var Express = require('express'),
    Router = Express.Router(),

    ideaPolicy = require('../policies/policy'),

    ideaController = require('../controllers/idea.controller');

Router.route('/createIdea').all(ideaPolicy.isAllowed).post(ideaController.createIdea);

Router.route('/editIdea').all(ideaPolicy.isAllowed).post(ideaController.editIdea);

Router.route('/getIdea').all(ideaPolicy.isAllowed).post(ideaController.getIdea);

Router.route('/getTitle').all(ideaPolicy.isAllowed).post(ideaController.getTitle);

Router.route('/getTags').all(ideaPolicy.isAllowed).post(ideaController.getTags);

Router.route('/favouriteIdea').all(ideaPolicy.isAllowed).post(ideaController.favouriteIdea);

Router.route('/recentIdeasByUser').all(ideaPolicy.isAllowed).post(ideaController.recentIdeasByUser);

Router.route('/getLeadBoardStats').all(ideaPolicy.isAllowed).post(ideaController.getLeadBoardStats);

Router.route('/spam').all(ideaPolicy.isAllowed).post(ideaController.getSpam);

Router.route('/getDashBoardStats').all(ideaPolicy.isAllowed).post(ideaController.getDashBoardStats);

Router.route('/getOneIdea').all(ideaPolicy.isAllowed).post(ideaController.getOneIdea);

Router.route('/getCitableKeywords').all(ideaPolicy.isAllowed).post(ideaController.getCitableKeywords);

Router.route('/autoCompleteByKnowledge').all(ideaPolicy.isAllowed).post(ideaController.autoCompleteByKnowledge);

Router.route('/getKnowledeByKeywords').all(ideaPolicy.isAllowed).post(ideaController.getKnowledeByKeywords);

Router.route('/getCitationTreeData').all(ideaPolicy.isAllowed).post(ideaController.getCitationTreeData);

Router.route('/deleteIdea').all(ideaPolicy.isAllowed).post(ideaController.deleteIdea);

module.exports = Router;
